var markerOptions = null;
var positionsX = new Array();
var positionsY = new Array();
var lastIndex;


function paintMarkers()
{

}

function loadMarkersPosition()
{

}




function positionDecode()
{
    alert("You clicked the map.");
}

function initialize()
{
    alert("peki");
    map.setCenter(new GLatLng(37.4419, -122.1419), 17);

    GEvent.addListener(map, "click", function(overlay, latlng)
    {
        if (latlng)
        {
            var myHtml = "The GPoint value is: " + map.fromLatLngToDivPixel(latlng) + " at zoom level " + map.getZoom();
            map.openInfoWindow(latlng, myHtml);
        }
    });

    // Add 10 markers to the map at random locations
    var bounds = map.getBounds();
    var southWest = bounds.getSouthWest();
    var northEast = bounds.getNorthEast();
    var lngSpan = northEast.lng() - southWest.lng();
    var latSpan = northEast.lat() - southWest.lat();
    for (var i = 0; i < 10; i++)
    {
        var point = new GLatLng(southWest.lat() + latSpan * Math.random(),
                southWest.lng() + lngSpan * Math.random());
        map.addOverlay(new GMarker(point, markerOptions));
    }

}

function normalMap()
{
    map.setMapType(G_NORMAL_MAP);
}

function setPointIcon()
{
    var blueIcon = new GIcon();
    blueIcon.image = "resource://META-INF/music/core/ui/style/images/point.png";
    cafeIcon.iconSize = new GSize(12, 20);
    cafeIcon.shadowSize = new GSize(22, 20);
    cafeIcon.iconAnchor = new GPoint(6, 20);
    cafeIcon.infoWindowAnchor = new GPoint(5, 1);
    markerOptions = { icon:blueIcon };

}

function setGmailSmallControl()
{
    map.addControl(new GSmallMapControl());
}